<?php

namespace app\admin\controller;

use app\admin\utils\ontimeLog;
use think\Controller;
use think\Session;

class Index extends Controller
{
    public function index()
    {
        ontimeLog::mylog(Session::get('username'), __FILE__, __METHOD__);
        if (Session::get('username')) {
            return $this->fetch('/index');
        } else {
            $this->error('还没登陆，请登陆', '/admin/login');
        }
    }

    public function welcome()
    {
        return $this->fetch('/X-admin/welcome');
    }
}